          <!-- START OF MAINCOL -->
          <div class="MainCol AddEbookPage">
          	  <h1>群发邮件</h1>
              <span class="NormalFont SmallFont">
                  <?= CHtml::image(Yii::app()->baseUrl.'/images/home_icon.gif', '主页'); ?> > 用户管理 > 群发邮件 
               </span><br /><br />
              <div class="Titlebox box"><!-- DON'T DELETE --></div>
              <?php if($bulkMail->hasErrors()):  echo CHtml::errorSummary($bulkMail); endif; ?>
              <?php if(Yii::app()->user->hasState('sendingMailsCount')) : ?>
              <div class="SaveBox Smallbox">
                <span class="Error"> 一个群发邮件的进程正在进行中，不能同时进行两个或以上的群发邮件操作。</span>
              </div>
              <?php endif ?>
              
              
              <div class="Smallbox"><label>邮件主题</label>
                  <?= $bulkMail->title; ?>
              </div>
              <div id="send_mail_process">
              <?php $this->widget('AdminSendMailProcess') ?>
              </div>
          </div>
          <?php Yii::app()->user->setFlash('bulkMail', serialize($bulkMail)); ?>
          <script type="text/javascript">
          $(document).ready(function() {
				$.get('<?php echo CHtml::normalizeUrl(array('/admin/users/starttosendmail')) ?>');

				function updateSendingProcess() {
					$.get('<?php echo CHtml::normalizeUrl(array('/admin/users/updatesendingprocess')) ?>', { }, function(data) {
							$('#send_mail_process').html(data);
						}
					);
				}
				window.setInterval(updateSendingProcess, 800);
          });
          </script>
          <!-- END OF MAINCOL -->